package co.yixiang.modules.user.domain;


import co.yixiang.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 签到记录表
 * </p>
 *
 * @author hupeng
 * @since 2019-12-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "YxUserSign对象", description = "签到记录表")
public class YxUserSign extends BaseDomain {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户uid")
    private Long uid;

    @ApiModelProperty(value = "签到说明")
    private String title;

    @ApiModelProperty(value = "获得积分")
    private Integer number;

    @ApiModelProperty(value = "剩余积分")
    private Integer balance;

    public static YxUserSignBuilder builder() {
        return new YxUserSignBuilder();
    }

    public static class YxUserSignBuilder {
        private Long id;
        private Long uid;
        private String title;
        private Integer number;
        private Integer balance;

        YxUserSignBuilder() {
        }

        public YxUserSignBuilder id(Long id) {
            this.id = id;
            return this;
        }

        public YxUserSignBuilder uid(Long uid) {
            this.uid = uid;
            return this;
        }

        public YxUserSignBuilder title(String title) {
            this.title = title;
            return this;
        }

        public YxUserSignBuilder number(Integer number) {
            this.number = number;
            return this;
        }

        public YxUserSignBuilder balance(Integer balance) {
            this.balance = balance;
            return this;
        }

        public YxUserSign build() {
            return new YxUserSign(id, uid, title, number, balance);
        }

        public String toString() {
            return "YxUserSign.YxUserSignBuilder(id=" + this.id + ", uid=" + this.uid + ", title=" + this.title + ", number=" + this.number + ", balance=" + this.balance + ")";
        }
    }
}
